home *** CD-ROM | disk | FTP | other *** search
/ Aminet 32 / Aminet 32 (1999)(Schatztruhe)[!][Aug 1999].iso / Aminet / dev / lang / Python151_Src.lha / Python1.5_Source / Include / mymath.h < prev    next >
C/C++ Source or Header  |  1998-01-22  |  2KB  |  84 lines

  1. /* On the 68K Mac, when using CFM (Code Fragment Manager),
  2.    <math.h> requires special treatment -- we need to surround it with
  3.    #pragma lib_export off / on...
  4.    This is because MathLib.o is a static library, and exporting its
  5.    symbols doesn't quite work...
  6.    XXX Not sure now...  Seems to be something else going on as well... */
  7.  
  8. #ifdef SYMANTEC__CFM68K__
  9. #pragma lib_export off
  10. #endif
  11.  
  12. #include <math.h>
  13.  
  14. #ifdef SYMANTEC__CFM68K__
  15. #pragma lib_export on
  16. #endif
  17.  
  18. #ifndef HAVE_HYPOT
  19. extern double hypot Py_PROTO((double, double));
  20. #endif
  21.  
  22.  
  23. #if defined(USE_MSL) && defined(__MC68K__)
  24. /* CodeWarrior MSL 2.1.1 has weird define overrides that don't work
  25. ** when you take the address of math functions. If I interpret the
  26. ** ANSI C standard correctly this is illegal, but I haven't been able
  27. ** to convince the MetroWerks folks of this...
  28. */
  29. #undef acos
  30. #undef asin
  31. #undef atan
  32. #undef atan2
  33. #undef ceil
  34. #undef cos
  35. #undef cosh
  36. #undef exp
  37. #undef fabs
  38. #undef floor
  39. #undef fmod
  40. #undef log
  41. #undef log10
  42. #undef pow
  43. #undef sin
  44. #undef sinh
  45. #undef sqrt
  46. #undef tan
  47. #undef tanh
  48. #define acos acosd
  49. #define asin asind
  50. #define atan atand
  51. #define atan2 atan2d
  52. #define ceil ceild
  53. #define cos cosd
  54. #define cosh coshd
  55. #define exp expd
  56. #define fabs fabsd
  57. #define floor floord
  58. #define fmod fmodd
  59. #define log logd
  60. #define log10 log10d
  61. #define pow powd
  62. #define sin sind
  63. #define sinh sinhd
  64. #define sqrt sqrtd
  65. #define tan tand
  66. #define tanh tanhd
  67. #endif 
  68.  
  69.  
  70. /* include proper Amiga SAS/C math include files: (I.J. 15 dec. 1996) */
  71. /* NOTE: YOU MUST REBUILD THE G.S.T. IF YOU CHANGE THE MATH OPTIONS!  */
  72.  
  73. #ifdef __SASC
  74. #if defined(_IEEE) && !defined(_M68881)
  75. #include <mieeedoub.h>
  76. #endif
  77. #ifdef _FFP
  78. #include <mffp.h>
  79. #endif
  80. #ifdef _M68881
  81. #include <m68881.h>
  82. #endif
  83. #endif
  84.